package com.ywl.designpattern.state;

// 售罄状态
public class SoldOutState implements State {
    VendingMachine vendingMachine;

    public SoldOutState(VendingMachine vendingMachine) {
        this.vendingMachine = vendingMachine;
    }

    @Override
    public void insertCoin() {
        System.out.println("您不能插入硬币，商品已售罄");
    }

    @Override
    public void ejectCoin() {
        System.out.println("您不能退币，您还没有插入硬币");
    }

    @Override
    public void selectItem() {
        System.out.println("您已选择商品，但商品已售罄");
    }

    @Override
    public void dispense() {
        System.out.println("没有商品分发");
    }
}
